<%@ page import="eqpkanban.EqpShape" %>
<%--
    @Description： 设备图形信息列表展示
    @Author： 樊双峰
    @Date： 2018-07-03 22:52
--%>
<style type="text/css">
th, tr, td {
    text-align: center;
}
</style>
<script type="text/javascript" src="${request.contextPath}/js/eqpBoard/eqpInfo.js"></script>

<div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch" action="${request.getContextPath()}/EqpBoard/eqpInfo"
          method="post">
        <div class="bjui-searchBar">
            <g:hiddenField name="SYS_QUERY_NAME" value="getEqpInfo"/>
            <label>区域名称：</label>
            <g:select name="areaName" from="${areaList}" data-toggle="selectpicker" data-live-search="true"
                      optionKey="AREA_NAME" optionValue="AREA_DESC" value="${areaName}"
                      data-width="120"
                      noSelection="['': '-- All --']"/>&nbsp;
            <label>设备名称：</label>
            <g:select name="eqpId" from="${eqpList}" data-toggle="selectpicker" data-live-search="true"
                      optionKey="EQP_ID" optionValue="EQP_ID" value="${eqpId}"
                      data-width="120"
                      noSelection="['': '-- All --']"/>&nbsp;
            <button type="submit" class="btn-default" data-icon="search">查询</button>&nbsp;&nbsp;&nbsp;&nbsp;
            <a class="btn btn-green eqp" data-toggle="dialog" disabled="" data-url="${request.getContextPath()}/EqpBoard/addEqp"
               data-title="新增">新增设备</a>&nbsp;&nbsp;|&nbsp;&nbsp;
            <a href="javascript:void(0)" class="btn btn-blue eqp" disabled=""
               onclick="editEqpBoard('${request.contextPath}/EqpBoard/editEqpBoard')">看板维护</a>&nbsp;&nbsp;|&nbsp;&nbsp;
            <a href="javascript:void(0)" class="btn btn-default"
               onclick="showEqpBoard('${request.contextPath}/EqpBoard/showEqpBoard')" data-icon="home">看板展示</a>
        </div>
    </form>
</div>
<div class="bjui-pageContent tableContent">
    <g:if test="${getEqpInfo.size() > 0}">
        <table data-toggle="tablefixed" data-width="100%" data-nowrap="true">
            <thead>
            <tr>
                <th width="50">No.</th>
                <th>区域</th>
                <th>图形</th>
                <th>设备ID</th>
                <th>设备描述</th>
                <th>设备类型</th>
                <th>设备位置</th>
                <th>设备状态</th>
                %{--<th>通讯状态</th>--}%
                <th>宽</th>
                <th>高</th>
                <th>X</th>
                <th>Y</th>
                <th>角度值</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <g:each in="${getEqpInfo}" status="i" var="eqp">
                <tr>
                    <td>${i + 1}</td>
                    <td>${eqp.AREA_DESC}</td>
                    <td>${eqp.GRAPH_DESC}</td>
                    <td>${eqp.EQP_ID}</td>
                    <td>${eqp.EQP_DESC}</td>
                    <td>${eqp.EQP_TYPE}</td>
                    <td>${eqp.EQP_LOC}</td>
                    <td>${eqp.EQP_STATE}</td>
                    %{--<td>${eqp.EQP_COMM_STATE}</td>--}%
                    <td>${eqp.WIDTH}</td>
                    <td>${eqp.HEIGHT}</td>
                    <td>${eqp.X}</td>
                    <td>${eqp.Y}</td>
                    <td>${eqp.ROTATION}</td>
                    %{--<td>${shape.PORT_ID}</td>--}%
                    %{--<td>${shape.PORT_DESC} </td>--}%
                    <td>
                        <a class="btn btn-green eqp" data-toggle="dialog" disabled=""
                           data-url="${request.getContextPath()}/EqpBoard/editEqp?id=${eqp.ID}"
                           data-title="编辑">编辑</a>
                        <a class="btn btn-red eqp" data-confirm-msg="确定要删除该行信息吗？"
                           data-toggle="doajax" data-type="DELETE" disabled=""
                           data-callback=function(){$.CurrentNavtab.navtab('refresh')}
                           href="${request.getContextPath()}/EqpBoard/deleteEqpInfo?id=${eqp.ID}">删除</a>
                    </td>
                </tr>
            </g:each>
            </tbody>
        </table>
    </g:if>
    <g:else>
        <g:render template="../template/emptyPanel"/>
    </g:else>
</div>
<g:render template="../template/pagination"/>
<script>
    $(function(){
        power('${user}')
    });
</script>